<{layout name="admin/layout/default" /}>
<div class="row" id="edit_manager" data-page="manage/edit">
    <div class="row">
        <div class="col-lg-12">
            <a class="btn btn-default" href="<{:url('admin/manage/list')}>">返回</a>
        </div>
    </div>

    <hr />

    <div class="row m-t">
        <div class="col-lg-4 col-lg-offset-4">
            <div class="form-group">
                <label>邮箱</label>
                <input type="email" class="form-control" :disabled="this.id" v-model="email">
            </div>
        </div>
    </div>

    <div class="col-lg-12">
        <div class="row m-t">
            <div class="col-lg-4 col-lg-offset-4">
                <div class="form-group">
                    <label>姓名</label>
                    <input type="text" class="form-control" v-model="name">
                </div>
            </div>
        </div>

        <div class="row m-t">
            <div class="col-lg-4 col-lg-offset-4">
                <div class="form-group">
                    <label>角色</label>
                    <select class="form-control" v-model="role" name="role">
                        <option value="">请选择</option>
                        <option v-if="pageData.roles" v-for="opt in pageData.roles" :value="opt.id">{{opt.name}}</option>
                    </select>
                </div>
            </div>
        </div>

        <div class="row" v-if="! id">
            <div class="col-lg-4 col-lg-offset-4">
                <div class="form-group">
                    <label>请输入新密码</label>
                    <input type="password" class="form-control" v-model="password">
                </div>
            </div>
        </div>

        <div class="row" v-if="! id">
            <div class="col-lg-4 col-lg-offset-4">
                <div class="form-group">
                    <label>请再次输入</label>
                    <input type="password" class="form-control" v-model="password_confirmation">
                </div>
            </div>
        </div>

        <div class="row m-t">
            <div class="col-lg-4 col-lg-offset-4">
                <div class="form-group">
                    <label>状态 </label>
                    <label class="radio-inline">
                        <input type="radio" name="status" value="1" v-model="status">启用
                    </label>
                    <label class="radio-inline">
                        <input type="radio" name="status" value="2" v-model="status">禁用
                    </label>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-lg-2 col-lg-offset-5 m-b-xl">
                <div class="btn btn-primary btn-block" @click="submit()">提交</div>
            </div>
        </div>
    </div>
</div>
